package com.smart.demo.conteoller;

import com.smart.demo.entity.User;
import com.smart.demo.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;


    @GetMapping("/getUsers")
    public List<User> getUsers(){
        return userService.list();

    }

}
